<script setup>
import {ref} from 'vue'

let msg = ref('04-事件绑定')
let canView = ref(false)
</script>

<template>
  <h1 v-if="canView">{{ msg }}</h1>
  <button @click="() => canView = !canView">点击</button>
</template>

<style scoped>
</style>
